-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite GC page metadata for sweeping fast path #16632
Conversation
3d39168
to
a4f6ad7
Compare
// Note that before marking or after sweeping there can be live | ||
// (and young) cells in the page for `!has_marked`. | ||
uint16_t has_marked: 1; | ||
// Whether any cell was live and yound **before sweeping**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
young
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooops, I must really like 'd' these days. I typed count as cound many times while working on this.
7db1980
to
60ce494
Compare
d7e6eae
to
3de7ae6
Compare
Just fixed a stupid bug in the full collection heuristics I added that was causing a runtime regression (and possibly memory) and this should be ready now. I'd like to run this through the CI's a few more time to check. It'll also be nice if someone else could also verify the page metadata is valid. See here for the meanings of each bits and the motivation of the design can be found here. |
3de7ae6
to
7f04c76
Compare
Cool ! LGTM. That was smaller than I expected. We should still run a round of benchs because the heuristics are a little touchy. |
e87217a
to
ad0c525
Compare
2f44b01
to
0695c27
Compare
* Delete `gc_bits` and `allocd` which are not enough to accurately record the necessary information. * Add `has_marked` and `has_young` to identify free pages and untouched pages. Fixes #15543
0695c27
to
45a012e
Compare
This implements a slightly modified version of the page metadata part of the bit swapping generational GC (the part currently implemented is actually simpler due to not having to worry about the other gc bit...). @carnaval
gc_bits
andallocd
in page metadata which are not enough to accuratelyrecord the necessary information.
has_marked
andhas_young
to identify free pages and untouched pages.TODO:
Fixes #15543
Replaces #13993